﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlReportThongTinSanPham.ascx.cs" Inherits="UserControl_ControlReportThongTinSanPham" %>


<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>


<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>


<script type="text/javascript">
    function pageLoad() {

        $("#<%= imgBtnAdd.ClientID %>").click(function () {
          
                $.blockUI({
                    message: '<h1>Xin vui lòng chờ xử lý</h1>',
                    css: {
                        border: 'none',
                        padding: '15px',
                        backgroundColor: '#f00',
                        opacity: .5,
                        color: '#fff'
                    }
                });
           
        });
        $("#<%= imgBtnSave.ClientID %>").click(function () {
            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });
            setTimeout($.unblockUI, 5000);
        });
        $("#<%= ImgBtnRefresh.ClientID %>").click(function () {

            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });

        });
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }

    }

</script>


<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="imgBtnSave" />
</Triggers>
    <ContentTemplate>
    
                <div class="direct_container_right_titletop direct_colleft">
                    Báo cáo thông tin mặt hàng
                </div>
                
                <!-- Button chuc nang-->
                <div class="direct_menu_report_page direct_colleft">
                    <asp:ImageButton ID="imgBtnAdd" ToolTip="Lấy dữ liệu" onclick="imgBtnAdd_Click"  ImageUrl="~/Images/Document.png" Width="32px" Height="32px" runat="server" />
                    <asp:ImageButton ID="imgBtnSave" ToolTip="Xuất ra file excel"  onclick="imgBtnSave_Click" ImageUrl="~/Images/download.png" Width="32px" Height="32px" runat="server" />
                    <asp:ImageButton ID="ImgBtnRefresh" onclick="imgBtnRefresh_Click" CausesValidation="false" ToolTip="Reset lại dữ liệu" ImageUrl="~/Images/Refresh.png" Width="32px" Height="32px" runat="server" />
                 </div>
                <!-- End Button chuc nang-->
                <div class="clear"></div>
                 <hr />

                
                   <table>
                   
                    <tr>
                    <td>
        <dxpgw:ASPxPivotGridExporter ID="ASPxPivotGridExporter1" ASPxPivotGridID="ASPxPivotGrid1" runat="server">
        </dxpgw:ASPxPivotGridExporter>
        <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1" CustomizationFieldsVisible="true" runat="server">
                 <Fields>
                <dxwpg:PivotGridField ID="PivotGridField1" Area="FilterArea" Visible="False"  AreaIndex="0" Caption="Nhà phân phối" FieldName="NPP">
                </dxwpg:PivotGridField>
                <dxwpg:PivotGridField ID="PivotGridField2" Area="FilterArea" Visible="False"  AreaIndex="1" Caption="Gam hàng" FieldName="Group">
                </dxwpg:PivotGridField>
                
                <dxwpg:PivotGridField ID="PivotGridField4" Area="FilterArea" Visible="False"  AreaIndex="2" Caption="Nhóm sản phẩm" FieldName="Channel">
                </dxwpg:PivotGridField>

                 <dxwpg:PivotGridField ID="PivotGridField5" Area="RowArea"  AreaIndex="1" Caption="Tên hàng theo NPP" FieldName="itemkey">
                </dxwpg:PivotGridField>
                <dxwpg:PivotGridField ID="PivotGridField6" Area="RowArea"  AreaIndex="0" Caption="Tên hàng theo Fimex" FieldName="ParentItem">
                </dxwpg:PivotGridField>
                <dxwpg:PivotGridField ID="PivotGridField3" Area="FilterArea" Visible="False" AreaIndex="4" Caption="Nguyên giá" FieldName="Price">
                </dxwpg:PivotGridField>
                 <dxwpg:PivotGridField ID="PivotGridField8" Area="FilterArea" Visible="False"  AreaIndex="3" Caption="Head Office" FieldName="Head">
                </dxwpg:PivotGridField>
                
                </Fields>
                 <OptionsPager Visible="False">
               </OptionsPager>
               <OptionsView ShowColumnGrandTotals="False" ShowRowGrandTotals="False" ShowRowTotals="False" ShowColumnTotals="False" />
        </dxwpg:ASPxPivotGrid>
     </td>
                    </tr>
                 </table>
    </ContentTemplate>
</asp:UpdatePanel>